Kinetis Platform SDK API Reference Manual  1.0d1
Freescale Semiconductor, Inc. Confidential - NDA only
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Groups Pages
fsl_phy_driver.h File Reference
#include <stdint.h>
#include <stdbool.h>
#include "fsl_enet_driver.h"

Data Structures

struct  enet_phy_api_t
 Defines the basic PHY application. More...
 

Enumerations

enum  phy_status_t {
  kStatus_PHY_Success = 0,
  kStatus_PHY_InvaildInput = 1,
  kStatus_PHY_TimeOut = 2,
  kStatus_PHY_Fail = 3
}
 Defines the PHY return status. More...
 
enum  phy_timeout_t { kPhyTimeout = 0x10000 }
 Defines the ENET timeout. More...
 
enum  enet_phy_register_t {
  kEnetPhyCR = 0,
  kEnetPhySR = 1,
  kEnetPhyId1 = 2,
  kEnetPhyId2 = 3,
  kEnetPhyCt2 = 0x1f
}
 Defines the PHY register. More...
 
enum  enet_phy_control_t {
  kEnetPhyAutoNeg = 0x1000,
  kEnetPhySpeed = 0x2000,
  kEnetPhyLoop = 0x4000,
  kEnetPhyReset = 0x8000,
  kEnetPhy10HalfDuplex = 0x4,
  kEnetPhy100HalfDuplex = 0x8,
  kEnetPhy10FullDuplex = 0x14,
  kEnetPhy100FullDuplex = 0x18
}
 Defines the control flag. More...
 
enum  enet_phy_speed_t {
  kEnetSpeed10M = 0,
  kEnetSpeed100M = 1
}
 Defines the PHY link speed. More...
 
enum  enet_phy_duplex_t {
  kEnetHalfDuplex = 0,
  kEnetFullDuplex = 1
}
 Defines the PHY link duplex. More...
 
enum  enet_phy_status_t {
  kEnetPhyLinkStatus = 0x4,
  kEnetPhyAutoNegAble = 0x08,
  kEnetPhyAutoNegComplete = 0x20,
  kEnetPhySpeedDulpexMask = 0x1c
}
 Defines the PHY status. More...
 

Functions

PHY Driver
uint32_t phy_init (enet_dev_if_t *enetIfPtr)
 Initializes PHY. More...
 
uint32_t phy_auto_discover (enet_dev_if_t *enetIfPtr)
 PHY address auto discover. More...
 
uint32_t phy_get_link_speed (enet_dev_if_t *enetIfPtr, enet_phy_speed_t *status)
 Gets the PHY link speed. More...
 
uint32_t phy_get_link_status (enet_dev_if_t *enetIfPtr, bool *status)
 Gets the PHY link status. More...
 
uint32_t phy_get_link_duplex (enet_dev_if_t *enetIfPtr, enet_phy_duplex_t *status)
 Gets the PHY link duplex. More...
 

Variables

const enet_phy_api_t g_enetPhyApi